package com.baor.controller;

import com.baor.domain.SeparateVo;
import com.baor.service.SeparateService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/separate")
public class SeparateController {

    @Autowired
    private SeparateService separateService;

    @RequestMapping("/separateList")
    public AjaxResult<?> separateList(@RequestBody Map<String, Object> params) {
        return separateService.separateList(params);
    }

    @RequestMapping("/separateInfo")
    public AjaxResult<?> separateInfo(@RequestBody SeparateVo separateVo) {
        return separateService.separateInfo(separateVo);
    }

    @RequestMapping("/insertSeparate")
    public AjaxResult<?> insertSeparate(@RequestBody SeparateVo separateVo) {
        return separateService.insertSeparate(separateVo);
    }

    @RequestMapping("/updateSeparate")
    public AjaxResult<?> updateSeparate(@RequestBody SeparateVo separateVo) {
        return separateService.updateSeparate(separateVo);
    }

    @RequestMapping("/deleteSeparate")
    public AjaxResult<?> deleteSeparate(@RequestBody SeparateVo separateVo) {
        return separateService.deleteSeparate(separateVo);
    }

    @RequestMapping("/separateSuperior")
    public AjaxResult<?> separateSuperior() {
        return separateService.separateSuperior();
    }

    @RequestMapping("/separateSelect")
    public AjaxResult<?> separateSelect(@RequestBody Integer siteId) {
        return separateService.separateSelect(siteId);
    }

}
